/**
 *	@file	slot_def.h
 *	@brief	スロット　プログラムリテラル定義
 */

#ifndef __H_SLOT_DEF_H__
#define __H_SLOT_DEF_H__

#define UFRM_GUIDE	(GF_BGL_FRAME0_M)
#define UFRM_PICT	(GF_BGL_FRAME1_M)
#define UFRM_DRAFT	(GF_BGL_FRAME2_M)
#define UFRM_BACK	(GF_BGL_FRAME3_M)

enum{
 UFRM_GUIDE_PRI,
 UFRM_PICT_PRI,
 UFRM_DRAFT_PRI,
 UFRM_BACK_PRI,
};

#define DFRM_MSG	(GF_BGL_FRAME0_S)
#define DFRM_MECH	(GF_BGL_FRAME1_S)
#define DFRM_SHADOW	(GF_BGL_FRAME2_S)

enum{
 DFRM_MSG_PRI,
 DFRM_MECH_PRI,
 DFRM_SHADOW_PRI,
 DFRM_REEL_PRI,
};

//=======================================
///アルファ値設定
//=======================================
#define ALPHA_SECOND	(26)
#define ALPHA_FIRST		(6)

#define ALPHA_MASK_1ST	(GX_BLEND_PLANEMASK_BG2)
#define ALPHA_MASK_2ND	(GX_BLEND_PLANEMASK_OBJ)

#define BRIGHTNESS_VALUE	(-8)
#define BRIGHTNESS_MASK		(GX_BLEND_PLANEMASK_BG1|GX_BLEND_PLANEMASK_BG2|GX_BLEND_PLANEMASK_BG3|GX_BLEND_PLANEMASK_OBJ)

//////////////////////////////////////////////////////
///メッセージ関連定義

#define WORDSET_SLOT_BUFLEN	(32)
#define WORDSET_SLOT_BUFNUM	(16)
#define SLOT_MSG_BUFLEN		(256)	///<メッセージ展開バッファ長

typedef enum{
 MIDX_WIN_IS_END,
 MIDX_WIN_COIN_FULL,
 MIDX_WIN_COIN_NG3,
 MIDX_WIN_COIN_NG0,
 MIDX_WIN_MAX,
}MIDX_WIN;

typedef enum{
 MIDX_SYS_BET,
 MIDX_SYS_START,
 MIDX_SYS_STOP,
 MIDX_SYS_BET_BONUS,
 MIDX_SYS_MAX,
}MIDX_SYS;

//--------------------------------------------------------------
///　ゲームモード
//--------------------------------------------------------------
typedef enum{
 MODE_NORMAL,
 MODE_HAPPY,
 MODE_SLAMP,
 MODE_MAX,
 MODE_BLANK = MODE_MAX,
}GAME_MODE;

typedef enum{
 STATE_NORMAL,
 STATE_BONUS,
}GAME_STATE;

#define EVENT_RECORD_MAX	(5)	//連荘数max

//--------------------------------------------------------------
///　当たりパターン
//--------------------------------------------------------------
#define PROB_VALUE	(1000)	//抽選確率の分母

#define WL_ICON_MAX	(3)

typedef enum{
 REACH_REG,
 REACH_BIG,
 REACH_CODE_MAX,
 REACH_CODE_BLANK = REACH_CODE_MAX,
}REACH_CODE;

//ノーマルゲームの役
typedef enum{
 PRIZE_BLANK,
 PRIZE_REPLAY,
 PRIZE_PIKA,
 PRIZE_MARIRU,
 PRIZE_BONG,
 PRIZE_REG,
 PRIZE_BIG,
 PRIZE_CODE_MAX,
}PRIZE_CODE;

//ボーナスゲームの役
typedef enum{
 BONUS_CHIKO,
 BONUS_HINO,
 BONUS_WANI,
 BONUS_CODE_MAX,
 BONUS_BLANK = BONUS_CODE_MAX,
}BONUS_CODE;

typedef enum{
 PRIZE_ST_0,
 PRIZE_ST_1,
 PRIZE_ST_2,
 PRIZE_ST_MAX,
}PRIZE_STATE;

typedef enum{
 LINE_SIDE1,	//上
 LINE_SIDE2,	//真ん中
 LINE_SIDE3,	//下
 LINE_CROSS1,	//左上→右下
 LINE_CROSS2,	//右上→左下
 LINE_CODE_MAX,
}LINE_CODE;

typedef enum{
 PICT_BLANK,
 PICT_REPLAY,
 PICT_MARIRU,
 PICT_PIKA,
 PICT_BONG,
 PICT_BALL,
 PICT_SEVEN,
 PICT_CHIKO,
 PICT_HINO,
 PICT_WANI,
 PICT_SCRIB,
 PICT_CODE_MAX,
}PICT_CODE;

//--------------------------------------------------------------
///　リールパターン
//--------------------------------------------------------------
typedef enum{
 REEL_REPLAY,
 REEL_PIKA,
 REEL_MARIRU,
 REEL_BONG,
 REEL_BALL,
 REEL_SEVEN,
 REEL_EMPTY,
 REEL_CHIKO1,
 REEL_CHIKO2,
 REEL_CHIKO3,
 REEL_CHIKO4,
 REEL_CHIKO5,
 REEL_CHIKO6,
 REEL_CHIKO7,
 REEL_CHIKO8,
 REEL_CHIKO9,
 REEL_HINO1,
 REEL_HINO2,
 REEL_HINO3,
 REEL_HINO4,
 REEL_HINO5,
 REEL_HINO6,
 REEL_HINO7,
 REEL_HINO8,
 REEL_HINO9,
 REEL_WANI1,
 REEL_WANI2,
 REEL_WANI3,
 REEL_WANI4,
 REEL_WANI5,
 REEL_WANI6,
 REEL_WANI7,
 REEL_WANI8,
 REEL_WANI9,
}REEL_PATTERN;

//--------------------------------------------------------------
///　リール番号
//--------------------------------------------------------------
typedef enum
{
	REEL_0,
	REEL_1,
	REEL_2,
	REEL_MAX,
}REEL_NUM;

typedef enum{
	REEL_DIR_DOWN,
	REEL_DIR_UP,
}REEL_DIR_CODE;

#define REEL_LINE_X	(3)
#define REEL_LINE_Y	(5)
#define REEL_LINE_YL	(REEL_LINE_Y-1)
#define REEL_IDX(x,y)	(((y)*REEL_MAX)+(x))

#define REEL_PT_MAX		(21)	//1ドラムの絵柄数
#define REEL_PT_V_SIZE	(24)	//絵柄のドットサイズ
#define REEL_PT_V_MAX	(REEL_PT_V_SIZE*REEL_LINE_Y)	//絵柄描画領域のYサイズ
#define REEL_SCROLL_MAX	(REEL_PT_MAX*REEL_PT_V_SIZE)

#define REEL_PT_V_GD(v) ((v)*REEL_PT_V_SIZE)	//グリッド -> ドット
#define REEL_PT_V_DG(v)	((v)/REEL_PT_V_SIZE)	//ドット -> グリッド

#define REEL_VIEW_OFS	(1)
#define REEL_BONUS_VIEW_OFS	(2)
#define REEL_VIEW_MAX	(3)

#define PULLIN_LIM_N	(4)
#define PULLIN_LIM_B	(1)

#define REEL_AUTO_STOP_WAIT	(4)

//////////////////////////////////////////
//背景種類定義
typedef enum{
 BGU_BACK_NORMAL,
 BGU_BACK_HAPPY,
 BGU_BACK_SLAMP,
 BGU_BACK_BONUS,
 BGU_BACK_BIG,
 BGU_BACK_CODE_MAX,
}BGU_BACK_CODE;


///////////////////////////////////////////
//TCB
enum{
 TCBPRI_REEL_CONTROL0,
 TCBPRI_REEL_CONTROL1,
 TCBPRI_REEL_CONTROL2,
 TCBPRI_PAYOUT,
 TCBPRI_REEL_LAMP_ANM,
 TCBPRI_BGU_EFFECT,
 TCBPRI_BGU_BACK_ANM_CHG,
 TCBPRI_STATE_CHG_EFF,
 TCBPRI_MONITER_EFF,
 TCBPRI_BGU_BACK_ANM,
};

///////////////////////////////////////////
///パレット定義
#define BACK_FONT_PAL	(1)
#define SYS_FONT_PAL	(11)

//ここまでnclの中
///////////////////////////////////
#define BMP_TALK_WIN_PAL	(12)
#define TALK_FONT_PAL		(13)
#define YESNO_WIN_PAL		(14)	//2本占有

///パレットアニメ
#define SLOT_BG_PALMAX	(12)
#define SLOT_OBJ_PALMAX	(16)

#define FCOL_WIN_W_BLACK	(GF_PRINTCOLOR_MAKE(FBMP_COL_BLACK,FBMP_COL_BLK_SDW,FBMP_COL_WHITE))
#define FCOL_SYS_N_WHITE	(GF_PRINTCOLOR_MAKE(1,2,0))
#define FCOL_SYS_B_GREEN	(GF_PRINTCOLOR_MAKE(3,4,5))
#define FCOL_SYS_BLACK		(5)

///モード切替アニメ
#define SLOT_MCHG_ANM_NUM	(3)

typedef enum{
 LIGHT_OFF,
 LIGHT_ON,
}LIGHT_STATE;

///////////////////////////////////////////
//アクター関連
#define SLOT_ACTPAL_NUM	(3)	///<管理パレット数

enum{
 ACTRES_UP,
 ACTRES_DOWN,
 SLOT_ACTRES_MAX,///<リソース数
};

//アクター管理数
enum{
 ACT_BACK,
 ACT_POKE,
 ACT_CUNVAS,
 ACT_ICON01,
 ACT_ICON02,
 ACT_ICON03,
 ACT_ICON04,
 ACT_ICON05,
 SYS_ACTMAX,
};

#define ACT_ICONMAX	(5)
#define REEL_ACTMAX	(REEL_MAX*REEL_LINE_Y)

#define SLOT_ACTMAX	(SYS_ACTMAX+REEL_ACTMAX)

enum{
 ACTU_SPRI_EFF,
 ACTU_SPRI_IRA2,
 ACTU_SPRI_DBL,
 ACTU_SPRI_ICON,
 ACTU_SPRI_CUNVAS = ACTU_SPRI_ICON+5,
};
enum{
 ACTD_SPRI_REEL,
 ACTD_SPRI_BACK,
};

enum{
 ANMU_CUNVAS,
 ANMU_DBR_F,
 ANMU_DBR_B,
 ANMU_DBR_AFB,
 ANMU_DBR_ABF,
 ANMU_DBR_DRAW,
 ANMU_DBR_HAPPY,
 ANMU_DBR_BLU,
 ANMU_ICON_MOYA,
 ANMU_ICON_ONPU,
 ANMU_ICON_EX1,
 ANMU_ICON_EX2,
 ANMU_ICON_IRA2,
 ANMU_ICON_NIKO,
 ANMU_ICON_MUKA,
};

enum{
 ANMD_BACK,
 ANMD_BACK_F,
 ANMD_BACK_A,
 ANMD_REEL_REPLAY,
 ANMD_REEL_PIKA,
 ANMD_REEL_MARIRU,
 ANMD_REEL_BONG,
 ANMD_REEL_BALL,
 ANMD_REEL_SEVEN,
 ANMD_REEL_EMPTY,
 ANMD_REEL_CHIKO1,
 ANMD_REEL_CHIKO2,
 ANMD_REEL_CHIKO3,
 ANMD_REEL_CHIKO4,
 ANMD_REEL_CHIKO5,
 ANMD_REEL_CHIKO6,
 ANMD_REEL_CHIKO7,
 ANMD_REEL_CHIKO8,
 ANMD_REEL_CHIKO9,
 ANMD_REEL_HINO1,
 ANMD_REEL_HINO2,
 ANMD_REEL_HINO3,
 ANMD_REEL_HINO4,
 ANMD_REEL_HINO5,
 ANMD_REEL_HINO6,
 ANMD_REEL_HINO7,
 ANMD_REEL_HINO8,
 ANMD_REEL_HINO9,
 ANMD_REEL_WANI1,
 ANMD_REEL_WANI2,
 ANMD_REEL_WANI3,
 ANMD_REEL_WANI4,
 ANMD_REEL_WANI5,
 ANMD_REEL_WANI6,
 ANMD_REEL_WANI7,
 ANMD_REEL_WANI8,
 ANMD_REEL_WANI9,
};
#define ANM_REEL_IDX	(ANMD_REEL_REPLAY)

#define ACT_BACK_PX	(29*8)
#define ACT_BACK_PY	(23*8)
#define ACT_DBR_PX	(10*8)
#define ACT_DBR_PY	(14*8+4)
#define ACT_CUNVAS_PX	(16*8)
#define ACT_CUNVAS_PY	(12*8)

#define ACT_REEL_PX	(11*8)
#define ACT_REEL_PY	(5*8)
#define ACT_REEL_OX	(5*8)
#define ACT_REEL_OY	(3*8)

///////////////////////////////////////////////
//ウィンドウ
enum{
 WIN_MSG,
 WIN_EXP,
 WIN_CON01,
 WIN_CON02,
 WIN_CON03,
 WIN_MAX,
};

///ウィンドウ関連キャラ領域指定(上下共用)
#define BMP_TALK_WIN_CGX	(1)

//はい・いいえメニュー領域
#define	BMP_YESNO_PX	( 25 )
#define	BMP_YESNO_PY	( 6 )
#define BMP_YESNO_FRM	( DFRM_MSG )
#define	BMP_YESNO_PAL	( YESNO_WIN_PAL )
#define BMP_YESNO_CGX_SIZ	(TOUCH_SW_USE_CHAR_NUM)
#define	BMP_YESNO_CGX	( BMP_TALK_WIN_CGX+TALK_WIN_CGX_SIZ )

//メッセージ領域
#define	BMP_MSG_PX	( 2 )
#define	BMP_MSG_PY	( 1 )
#define	BMP_MSG_SX	( 27 )
#define	BMP_MSG_SY	( 4 )
#define BMP_MSG_FRM	( DFRM_MSG )
#define	BMP_MSG_PAL	( TALK_FONT_PAL )
#define BMP_MSG_CGX_SIZ	(BMP_MSG_SX*BMP_MSG_SY)
#define	BMP_MSG_CGX	( BMP_YESNO_CGX+BMP_YESNO_CGX_SIZ )

#define	BMP_EXP_PX	( 2 )
#define	BMP_EXP_PY	( 0 )
#define	BMP_EXP_SX	( 28 )
#define	BMP_EXP_SY	( 2 )
#define BMP_EXP_FRM	( DFRM_MECH )
#define	BMP_EXP_PAL	( SYS_FONT_PAL )
#define BMP_EXP_CGX_SIZ	(BMP_EXP_SX*BMP_EXP_SY)
#define	BMP_EXP_CGX	( 1024-BMP_EXP_CGX_SIZ )

//操作説明文字列領域
#define	BMP_CON_PY	( 22 )
#define	BMP_CON_SX	( 6 )
#define	BMP_CON_SY	( 2 )
#define BMP_CON_FRM	( DFRM_MECH )
#define	BMP_CON_PAL	( SYS_FONT_PAL )
#define BMP_CON_CGX_SIZ	(BMP_CON_SX*BMP_CON_SY)

#define	BMP_CON01_PX	( 2 )
#define	BMP_CON01_CGX	( BMP_EXP_CGX-BMP_CON_CGX_SIZ )
#define	BMP_CON02_PX	( 10 )
#define	BMP_CON02_CGX	( BMP_CON01_CGX-BMP_CON_CGX_SIZ )
#define	BMP_CON03_PX	( 18 )
#define	BMP_CON03_CGX	( BMP_CON02_CGX-BMP_CON_CGX_SIZ )

//デバッグ用
#ifdef PM_DEBUG
#define BMP_DEB_PX	(3)
#define BMP_DEB_PY	(1)
#define BMP_DEB_SX	(29)
#define BMP_DEB_SY	(12)
#define BMP_DEB_CGX	(1024-(BMP_DEB_SX*BMP_DEB_SY))
#define BMP_DEB_FRM	(UFRM_GUIDE)
#define BMP_DEB_PAL	(6)
#endif

/////////////////////////////////////////////
//タッチパネル関連
/////////////////////////////////////////////
#define TP_BACK_W	(6*8)
#define TP_BACK_H	(19)
#define TP_BACK_X	(256-TP_BACK_W)
#define TP_BACK_Y	(192-TP_BACK_H)

#endif	//__H_SLOT_DEF_H__
